//
//  WSHttpManager.m
//  WisdomStudy
//
//  Created by 葛 军 on 16/12/5.
//  Copyright © 2016年 周剑. All rights reserved.
//

#import "WSHttpManager.h"

@implementation WSHttpManager

/**
 *  登录
 *  @param mobile 手机号
 *  @param password 密码
 */
+(void)loginWithMobile:(NSString *)mobile
                   password:(NSString *)password
                   complete:(completeBlock)complete{
    WisdomLiveHTTPSessionManager * manager = [[WisdomLiveHTTPSessionManager alloc]init];
    NSDictionary * parameters = @{@"username":mobile,
                                  @"password":password
                                  };
    [manager POSTWithControllerName:@"neteaselive" url:@"login" parameters:parameters complete:complete];
}

/**
 退出登录
 
 @param complete
 */
+(void)logOut:(completeBlock)complete{
    WisdomLiveHTTPSessionManager *manager = [[WisdomLiveHTTPSessionManager alloc] init];
    [manager POSTWithControllerName:@"neteaselive" url:@"logout" parameters:nil complete:complete];
}

/**
 *  直播信息
 */
+(void)neteaseliveInfoComplete:(completeBlock)complete{
    WisdomLiveHTTPSessionManager * manager = [[WisdomLiveHTTPSessionManager alloc]init];
    [manager GETWithControllerName:@"neteaselive" url:@"info" parameters:nil complete:complete];
}

/**
 获取APP规则内容
 
 @param code
 @param complete
 */
+(void)getAppRuleInfoInCode:(NSString *)code complete:(completeBlock)complete{
    
    WisdomLiveHTTPSessionManager *manager = [[WisdomLiveHTTPSessionManager alloc] init];
    NSDictionary *para = @{@"code":code};
    [manager GETWithControllerName:@"rule" url:@"getAppRuleInfoByCode" parameters:para complete:complete];
}

@end
